<?php

namespace app\common\model;

use think\Model;

class Menu extends Model
{
    public function child($id){
        return $this::all(['parent_id'=>$id]);
    }

    public function parent($child){
        return $this::get($child->parent_id);
    }
}
